result = []


def backtrack(nums, pos, count, m, track):
    if pos == nums:
        if count == m:
            result.append(track.copy())
        return

    if count < m:
        track[pos] = '1'
        backtrack(nums, pos + 1, count + 1, m, track)

    track[pos] = '0'
    backtrack(nums, pos + 1, count, m, track)


if __name__ == '__main__':
    temp = [0] * 5

    backtrack(5, 0, 0, 2, temp)
    for index, item in enumerate(result):
        print(index, item)

    for i in range(5):
        for j in range(i + 1, 5):
            print(str(i) + "-" + str(j))

    arr1 = ['a1', 'a2', 'a3']
    arr2 = ['b1', 'b2', 'b3']
    arr3 = ['c1', 'c2', 'c3']

    new_list = list(zip(arr1, arr2, arr3))
    print(new_list)